Change markFileAsViewed to keep files open by default#7319
Change markFileAsViewed to keep files open by default#7319laharigandrapu11 wants to merge 2 commits intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
|
I'm not a maintainer - but I'm wondering if the additional setting and change in default behavior is necessary. Given that we can pre-define arguments passed to keybinding commands it should be sufficient to only add the optional argument (changing the default to close the file to keep existing behavior intact) to the command itself while achieving the same end result. |
alexr00
left a comment
There was a problem hiding this comment.
Thank you for the PR! I agree with @mogelbrod. The feedback in #5092 is that there should be a way to control whether the file is closed when using a keybinding. For this, we don't need a setting, just another argument for options added to the command implementation here:
vscode-pull-request-github/src/commands.ts
Lines 1521 to 1522 in fd5f8d8
For now, the options just needs to be something like this:
{
dontCloseFile: boolean;
}d3873b5 to
1215412
Compare
Overview
When marking a file as viewed through the editor menu bar or keybinding, the file would automatically close. This behavior differed from using the tree view checkbox, which kept files open. This PR makes "keep open" the default for consistency, while providing a setting for users who prefer the old behavior.
Changes
githubPullRequests.closeFileOnMarkFileAsViewed(default: false)Demo
New Default Behavior
Default behavior: The File remains open after marking as viewed
Optional Behavior (Setting Enabled)
The screenshot below shows that the readme.md file closed when the checkmark was clicked

Optional behavior: File closes when setting is enabled
Configuration
Testing
Verified:
Fixes #5092